const temp =
`
<h3>这个是parent组件</h3>
<button>添加list</button>
<user-list title='这个是parent中的list组件'></user-list>
<style>
	/*只在当前作用域有效，对子集作用域无效*/
	:host {
		border: 10px solid red;
		display: block;
	}
	li{
		list-style: none;
	}
</style>
`

export default new MakeComp({
	temp,
	tagName: 'parent',
	updata: ($, that) => {
		const button = $('button');
	    const ulDom = $('user-list');
	    const list =[]
		button.onclick = (e) => {
			// console.log(that);
			list.push(list.length)
			that.componentData.list = list
		}
		return {
			button: v => button.innerText = v,
	    	list: v => {
	    		// console.log(v);
	    		ulDom.componentData.list = list
	    	}
		}
	},
	connectedCallback (that) {
		// console.log(this);
		// console.log(that);
	}
});
